export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = {
  [K in keyof T]: T[K];
};
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
  [SubKey in K]?: Maybe<T[SubKey]>;
};
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
  [SubKey in K]: Maybe<T[SubKey]>;
};
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
  ID: string;
  String: string;
  Boolean: boolean;
  Int: number;
  Float: number;
  Duration: string;
  Time: string;
};

export enum ActType {
  Create = "create",
  Delete = "delete",
  Update = "update",
}

export type AircraftAtaAlertCountPayload = {
  __typename?: "AircraftAtaAlertCountPayload";
  aircraftId: Scalars["String"];
  ata: AtaPayload;
  count: Scalars["Int"];
};

export type AircraftAtaModelAlertCountPayload = {
  __typename?: "AircraftAtaModelAlertCountPayload";
  aircraftId: Scalars["String"];
  ata: AtaPayload;
  ataModelUrl?: Maybe<Scalars["String"][]>;
  count: Scalars["Int"];
  model: PdmModelPayload;
};

export type AircraftConnection = {
  __typename?: "AircraftConnection";
  data: AircraftPayload[];
  page: PageInfo;
  totalCount: Scalars["Int"];
};

export type AircraftPayload = {
  __typename?: "AircraftPayload";
  aircraftType: Scalars["String"];
  airlineId: Scalars["String"];
  ataAlertCounts?: Maybe<AircraftAtaAlertCountPayload[]>;
  ataModelAlertCounts?: Maybe<AircraftAtaModelAlertCountPayload[]>;
  id: Scalars["String"];
  lastFlight?: Maybe<FlightPayload>;
  msn: Scalars["String"];
  productionDate: Scalars["Time"];
  tailNo: Scalars["String"];
};

export type AircraftPayloadAtaAlertCountsArgs = {
  lastDayNum?: InputMaybe<Scalars["Int"]>;
  statuses?: InputMaybe<AlertStatus[]>;
};

export type AircraftPayloadAtaModelAlertCountsArgs = {
  lastDayNum?: InputMaybe<Scalars["Int"]>;
  statuses?: InputMaybe<AlertStatus[]>;
};

export type AircraftQuery = {
  airlineId: Scalars["String"];
  page?: InputMaybe<Scalars["Int"]>;
  pageSize?: InputMaybe<Scalars["Int"]>;
};

export type AirlineModelPayload = {
  __typename?: "AirlineModelPayload";
  airlineId: Scalars["String"];
  model: PdmModelPayload;
  unprocessedAlertCount: Scalars["Int"];
};

export type AirlinePayload = {
  __typename?: "AirlinePayload";
  aircrafts?: Maybe<AircraftPayload[]>;
  airlineModels: AirlineModelPayload[];
  code: Scalars["String"];
  hotAirlineModels: AirlineModelPayload[];
  id: Scalars["ID"];
  modelAircraftAlerts?: Maybe<ModelAircraftAlertsPayload[]>;
  name: Scalars["String"];
};

export type AirlinePayloadHotAirlineModelsArgs = {
  limit: Scalars["Int"];
};

export type AirlinePayloadModelAircraftAlertsArgs = {
  modelId: Scalars["String"];
};

export type AlertConnection = {
  __typename?: "AlertConnection";
  data: AlertPayload[];
  page: PageInfo;
  totalCount: Scalars["Int"];
};

export type AlertPayload = {
  __typename?: "AlertPayload";
  aircraft: AircraftPayload;
  airline: AirlinePayload;
  ataId: Scalars["String"];
  id: Scalars["ID"];
  modelId: Scalars["String"];
  occurAt?: Maybe<Scalars["Time"]>;
  status: AlertStatus;
};

export type AlertQuery = {
  airlineId: Scalars["String"];
  lastDayNum?: InputMaybe<Scalars["Int"]>;
  modelId: Scalars["String"];
  page?: InputMaybe<Scalars["Int"]>;
  pageSize?: InputMaybe<Scalars["Int"]>;
  statuses?: InputMaybe<AlertStatus[]>;
};

export enum AlertStatus {
  Close = "CLOSE",
  Monitoring = "MONITORING",
  Open = "OPEN",
}

export type AtaPayload = {
  __typename?: "AtaPayload";
  code: Scalars["String"];
  color: Scalars["String"];
  id: Scalars["String"];
  name: Scalars["String"];
};

export type CalculatedParameterInput = {
  act_type: ActType;
  desc: Scalars["String"];
  expression: Scalars["String"];
  id?: InputMaybe<Scalars["String"]>;
  name: Scalars["String"];
  tid?: InputMaybe<Scalars["String"]>;
};

export type CalculatedParameterPayload = {
  __typename?: "CalculatedParameterPayload";
  created_at: Scalars["Time"];
  desc: Scalars["String"];
  expression: Scalars["String"];
  id: Scalars["String"];
  name: Scalars["String"];
  taskId: Scalars["String"];
  updated_at: Scalars["Time"];
};

export enum ChartType {
  Line = "line",
  LineArea = "lineArea",
  Scatter = "scatter",
}

export type ChartsInput = {
  color: Scalars["String"];
  expression: Scalars["String"];
  paramType: ParamType;
  title: Scalars["String"];
};

export type ChartsPayload = {
  __typename?: "ChartsPayload";
  color: Scalars["String"];
  expression: Scalars["String"];
  paramType: ParamType;
  title: Scalars["String"];
};

export type CreateTaskInput = {
  aircraftId: Scalars["String"];
  end_time: Scalars["Time"];
  flights: Scalars["String"][];
  id: Scalars["String"];
  name: Scalars["String"];
  start_time: Scalars["Time"];
  tailNo: Scalars["String"];
  uid: Scalars["String"];
  workspace: WorkspaceInput;
};

export type CreateTodoInput = {
  text: Scalars["String"];
  userId: Scalars["String"];
};

export type DeleteTaskInput = {
  id: Scalars["String"];
};

export type FlightPayload = {
  __typename?: "FlightPayload";
  aircraftId: Scalars["String"];
  id: Scalars["String"];
  landingAirportCode: Scalars["String"];
  landingTime: Scalars["Time"];
  takeoffAirportCode: Scalars["String"];
  takeoffTime: Scalars["Time"];
};

export type ModelAircraftAlertsPayload = {
  __typename?: "ModelAircraftAlertsPayload";
  aircraft: AircraftPayload;
  lastAlert?: Maybe<AlertPayload>;
  modelId: Scalars["String"];
  unprocessedAlertCount: Scalars["Int"];
};

export type Mutation = {
  __typename?: "Mutation";
  Params: CalculatedParameterPayload;
  createTask: TaskPayload;
  createTodo: TodoPayload;
  deleteTask: TaskPayload;
  updateSetting: SystemSettingConnection;
  updateTask: TaskPayload;
};

export type MutationParamsArgs = {
  input: CalculatedParameterInput;
};

export type MutationCreateTaskArgs = {
  input: CreateTaskInput;
};

export type MutationCreateTodoArgs = {
  input: CreateTodoInput;
};

export type MutationDeleteTaskArgs = {
  input: DeleteTaskInput;
};

export type MutationUpdateSettingArgs = {
  input: UpdateSettingInput;
};

export type MutationUpdateTaskArgs = {
  input: UpdateTaskInput;
};

export type PageInfo = {
  __typename?: "PageInfo";
  page: Scalars["Int"];
  pageSize: Scalars["Int"];
};

export enum ParamType {
  Custom = "Custom",
  Field = "Field",
}

export type PdmModelPayload = {
  __typename?: "PdmModelPayload";
  ataIds: Maybe<Scalars["String"]>[];
  code: Scalars["String"];
  id: Scalars["String"];
  name: Scalars["String"];
};

export type Query = {
  __typename?: "Query";
  aircraft: AircraftPayload;
  aircrafts?: Maybe<AircraftConnection>;
  airline: AirlinePayload;
  airlines: AirlinePayload[];
  alerts?: Maybe<AlertConnection>;
  me: UserPayload;
  setting: SystemSettingConnection;
  task: TaskPayload;
  tasks?: Maybe<TaskConnection>;
};

export type QueryAircraftArgs = {
  id: Scalars["String"];
};

export type QueryAircraftsArgs = {
  query: AircraftQuery;
};

export type QueryAirlineArgs = {
  id: Scalars["String"];
};

export type QueryAlertsArgs = {
  query: AlertQuery;
};

export type QueryTaskArgs = {
  id: Scalars["String"];
};

export type QueryTasksArgs = {
  query: TaskQuery;
};

export type SettingInput = {
  backgroundColors: Scalars["String"][];
  chartsHeight: Scalars["String"];
  profileChartParmas: Scalars["String"];
  setBgByStateQuantity: Scalars["Boolean"];
  stateQuantityParams: Scalars["String"];
};

export type SettingPayload = {
  __typename?: "SettingPayload";
  backgroundColors: Scalars["String"][];
  chartsHeight: Scalars["String"];
  profileChartParmas: Scalars["String"];
  setBgByStateQuantity: Scalars["Boolean"];
  stateQuantityParams: Scalars["String"];
};

export type SplitChartsInput = {
  XOffset: Scalars["String"];
  YOffset: Scalars["String"];
  chartType: ChartType;
  data: ChartsInput[];
  lowerLimit: Scalars["String"];
  name: Scalars["String"];
  upperLimit: Scalars["String"];
};

export type SplitChartsPayload = {
  __typename?: "SplitChartsPayload";
  XOffset: Scalars["String"];
  YOffset: Scalars["String"];
  chartType: ChartType;
  data: ChartsPayload[];
  lowerLimit: Scalars["String"];
  name: Scalars["String"];
  upperLimit: Scalars["String"];
};

export type SystemSettinInput = {
  content: SystemSettingContentInput;
  item: Scalars["String"];
};

export type SystemSettingConnection = {
  __typename?: "SystemSettingConnection";
  data: Maybe<SystemSettingPayload>[];
};

export type SystemSettingContentInput = {
  data: Scalars["Int"];
};

export type SystemSettingContentPayload = {
  __typename?: "SystemSettingContentPayload";
  data: Scalars["Int"];
};

export type SystemSettingPayload = {
  __typename?: "SystemSettingPayload";
  content: SystemSettingContentPayload;
  created_at: Scalars["Time"];
  id: Scalars["ID"];
  item: Scalars["String"];
  updated_at: Scalars["Time"];
};

export type TaskConnection = {
  __typename?: "TaskConnection";
  data: TaskPayload[];
  page: PageInfo;
  totalCount: Scalars["Int"];
};

export type TaskPayload = {
  __typename?: "TaskPayload";
  aircraftId: Scalars["String"];
  calculated_params: CalculatedParameterPayload[];
  created_at: Scalars["Time"];
  end_time: Scalars["Time"];
  flights: Scalars["String"][];
  id: Scalars["String"];
  name: Scalars["String"];
  start_time: Scalars["Time"];
  tailno: Scalars["String"];
  uid: Scalars["String"];
  updated_at: Scalars["Time"];
  workspace: WorkspacePayload;
};

export type TaskQuery = {
  CreateDateRange?: InputMaybe<InputMaybe<Scalars["String"]>[]>;
  UpdateDateRange?: InputMaybe<InputMaybe<Scalars["String"]>[]>;
  name?: InputMaybe<Scalars["String"]>;
  page?: InputMaybe<Scalars["Int"]>;
  pageSize?: InputMaybe<Scalars["Int"]>;
};

export type TodoPayload = {
  __typename?: "TodoPayload";
  done: Scalars["Boolean"];
  id: Scalars["ID"];
  text: Scalars["String"];
  user: UserPayload;
};

export type UpdateSettingInput = {
  setting?: InputMaybe<SystemSettinInput[]>;
};

export type UpdateTaskInput = {
  end_time: Scalars["Time"];
  flights?: InputMaybe<Scalars["String"][]>;
  id: Scalars["String"];
  start_time: Scalars["Time"];
  workspace: WorkspaceInput;
};

export type UserAirlinePayload = {
  __typename?: "UserAirlinePayload";
  airline: AirlinePayload;
  id: Scalars["ID"];
  userId: Scalars["String"];
};

export type UserPayload = {
  __typename?: "UserPayload";
  id: Scalars["ID"];
  name: Scalars["String"];
  userAirlines?: Maybe<UserAirlinePayload[]>;
};

export type WorkspaceInput = {
  name: Scalars["String"];
  setting: SettingInput;
  splitCharts: SplitChartsInput[];
  splitType: Scalars["String"];
};

export type WorkspacePayload = {
  __typename?: "WorkspacePayload";
  id: Scalars["String"];
  name: Scalars["String"];
  setting: SettingPayload;
  splitCharts: SplitChartsPayload[];
  splitType: Scalars["String"];
};
